package com.kou.backend.api.user;

import com.kou.backend.request.user.SaveUserReqDTO;
import com.kou.backend.resposne.ResultResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

/**
 * 用户操作相关api
 *
 * @author: Kou
 * @since: 2023/8/27 9:37
 */
@Tag(name = "用户管理相关接口")
@RequestMapping("v1/api/user")
@Validated
public interface IUserClient {

    @PostMapping("/query-list")
    @Operation(summary = "查询用户管理列表信息")
    ResultResponse<Object> queryUser();

    @GetMapping("/getInfo")
    @Operation(summary = "查询用户详情")
    ResultResponse<Object> detailUser();

    /**
     * 保存用户接口
     *
     * @param saveUserReqDTO 保存用户请求体
     * @return result response
     */
    @Operation(summary = "保存用户")
    @PostMapping("/save")
    ResultResponse<Object> saveUser(@Valid @RequestBody SaveUserReqDTO saveUserReqDTO);

    @PostMapping("/delete")
    @Operation(summary = "删除用户")
    ResultResponse<Object> deleteUser();
}
